package com.zmytest.annotation.exceptionhandler;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * Created on 2019/1/2.
 *
 * @author zhangmingyu
 */
@RestController
@RequestMapping("/annotation/exception-handler")
public class ExceptionTestController {

    @GetMapping("/myexc")
    public void test(){
        throw new MyException("系统出现异常，用户身份未知");
    }
}
